package com.program.houai.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.relational.core.sql.In;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @version v1.0
 * @ProjectName: EOrder-master
 * @ClassName: UserInfo
 * @Description: TODO(一句话描述该类的功能)
 * @Author: Topcheer
 * @Date: 2024/8/24 21:08
 */

@TableName("tb_user")
@Data
@ApiModel(value ="用户表",description = "用户表的字段")
public class UserEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private int id;

    @ApiModelProperty(value = "用户名")
    private String username;

    private String password;

    @ApiModelProperty(value = "性别，0：未知，1：男，2：女")
    private Integer gender;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private int age;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    @ApiModelProperty(value = "用户头像地址")
    private String  avatarUrl;

    @ApiModelProperty(value = "电话号码")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private String phone;

    @ApiModelProperty(value = "openId")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private String openId;

    @ApiModelProperty(value = "用户类型，0:游客,1:微信用户,2:h5注册")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private int type;

    @ApiModelProperty(value = "1个人2企业")
    private String userType;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "身份证正面")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private String frontCard ;

    @ApiModelProperty(value = "身份证反面")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private String reverseCard ;

    @ApiModelProperty(value = "公司名称")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private String companyName;

    @ApiModelProperty(value = "营业执照")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private String businessLicense ;

    @ApiModelProperty(value = "上级用户Id")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private Integer pid ;

    @ApiModelProperty(value = "APP用户id")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private Integer appUserId ;

    @ApiModelProperty(value = "审核状态 1通过 0 不通过")
    private String status ;

    @TableLogic
    private int isDeleted;

    @ApiModelProperty(value = "累计佣金")
    @TableField(updateStrategy = FieldStrategy.NEVER)
    private int money;

    @ApiModelProperty(value = "家庭住址")
    private String address;

    @ApiModelProperty(value = "紧急联系人")
    private String exigencyUserName;

    @ApiModelProperty(value = "紧急联系人联系方式")
    private String exigencyUserTel;

    @ApiModelProperty(name = "今日佣金(元)")
    @TableField(exist = false)
    private String  todayMoney;

    @ApiModelProperty(name = "昨日佣金(元)")
    @TableField(exist = false)
    private String  yestMoney;

    @ApiModelProperty(name = "余额")
    @TableField(exist = false)
    private String  mountMoney;

    public static void main(String[] args) {
        String newOrderNumber = "P2023"  + String.format("%07d", 1232);
        System.out.println(newOrderNumber);
    }
}
